<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>Snake</title>
    <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="full-screen" content="true"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta name="360-fullscreen" content="true"/>
    <style>
        html, body {
            -ms-touch-action: none;
            background: #888888;
            padding: 0;
            border: 0;
            margin: 0;
            height: 100%;
        }
    </style>
	<script src="bin/all.js"></script>
</head>
<body>

    <div style="margin: auto;width: 100%;height: 100%;" class="egret-player"
         data-entry-class="Main"
         data-orientation="auto"
         data-scale-mode="showAll"
         data-frame-rate="60"
         data-content-width="640"
         data-content-height="1136"
         data-show-paint-rect="false"
         data-multi-fingered="2"
         data-show-fps="false" data-show-log="false"
         data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
    </div>
    <script>
		//配置
		var conf = {
			"GRID_SIZE":24,
			"GRID_COLUMNS":15,
			"GRID_ROWS":25,
			"KEY_LEFT":"65",//a
			"KEY_RIGHT":"68",//d
			"KEY_DOWN":"83",//s
			"KEY_UP":"87",//w
			"KEY_RESTART":"13|108",//enter

			"INIIAL_LEN":3,//初始长度
			"INITIAL_SNAKE_SPEED":10,
			"INITIAL_UNIT_SPEED":25,

			"MAX_FOOD_IN_SCENE":2,
			"MAX_FOOD_LIFE":10,
			"TWINKLE_FOOD_LIFE":3
		}
		init_conf(conf);
	</script>
    <script>
        /**
         * {
         * "renderMode":, //引擎渲染模式，"canvas" 或者 "webgl"
         * "audioType": "" //使用的音频类型，0:默认，1:qq audio，2:web audio，3:audio
         * "antialias": //WebGL模式下是否开启抗锯齿，true:开启，false:关闭，默认为false
         * }
         **/
        egret.runEgret({renderMode:"webgl", audioType:0});
    </script>
</body>
</html>
